<template>
    <div class="chart-box" ref="chart1">
    </div>
</template>

<script>
import * as echarts from 'echarts'

export default {
    name: "CaseRead",
    data() {
        return {
            options: {
                tooltip: {
                    trigger: 'item'
                },
                series: [
                    {
                        type: 'pie',
                        radius: '70%',

                        label: {
                            show: true,
                            formatter: '{b}:{c}件',
                            color: '#fff',
                        },
                        data: [
                            { value: 1048, name: '执行' },
                            { value: 735, name: '行政' },
                            { value: 580, name: '民事' },
                            { value: 580, name: '刑事' },
                        ],
                        emphasis: {
                            itemStyle: {
                                shadowBlur: 10,
                                shadowOffsetX: 0,
                                shadowColor: 'rgba(0, 0, 0, 0.5)'
                            }
                        }
                    }
                ]
            }
        }
    },
    mounted() {

        setTimeout(() => {
            const chart = echarts.init(this.$refs.chart1)
            chart.setOption(this.options)
        }, 0)
    }
}
</script>

<style lang="less" scoped>
.chart-box {
    height: 225px;
    display: flex;
    width: 100%;
}
</style>